<template>
    <div class="register">
        <div class="registerCard">
            <div class="registerLogo">
                YOLO社区
            </div>
            <!--注册表单-->
            <div class="registerFrom">
                <el-form :rules="rules" :model="form" ref="regForm" label-width="100px">
					
                    <el-form-item label="用户名" prop="userName">
                        <el-input v-model="form.userName" class="input-width" clearable
                                  placeholder="只限英文和数字"></el-input>
                    </el-form-item>
						
                    <el-form-item label="密码" prop="password">
                        <el-input type="password" v-model="form.password" class="input-width" @input="replaceIllegal"
                                  clearable></el-input>
                    </el-form-item>
					
					<el-form-item label="昵称" prop="nickName">
					    <el-input v-model="form.nickName" class="input-width" ></el-input>
					</el-form-item>

                    <el-form-item class="btn_group">
                        <el-button type="success" @click="doReg()">注册</el-button>
                        <el-button @click="toHome">返回</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>
    </div>
</template>

<script src="./reg.js"></script>

<style lang="scss" scoped>
    @import "reg";
</style>
<style lang="scss">
    .register {
        .el-select {
            .el-input {
                width: 150px !important;
            }
        }
    }
</style>
